var express = require('express');
var router = express.Router();
const UserController = require("../controllers/UserController")

/* GET users listing. */
//用于获取所有用户
router.get('/', UserController.findAll);

//登录
router.post('/login', UserController.login);

//注册
router.post('/register', UserController.register);

//修改密码
router.post('/updatePwd', UserController.updatePwd);

//得到用户信息
router.get('/getUserInfo', UserController.getUserInfo);

//修改用户信息
router.post('/updateUserInfo', UserController.updateUserInfo);
/**
 * 修改用户头像
 * http://127.0.0.1:3001/users/uploadStudentsAvatar
 */
router.post("/updateUserIcon",UserController.updateUserIcon),


module.exports = router;
